#!/bin/zsh

# f*ck sudo, all my homies use doas btw
if [ -x /usr/bin/sudo ]; then
    alias sudo="/dev/null"
fi

# overkill kitty scrollback clearing
if [ $TERM = xterm-kitty ]; then
    alias clear="printf '\033[2J\033[3J\033[1;1H'"
fi

case $TERM in
    xterm-kitty)
        alias icat="kitty +icat"
        ;;
    foot)
        alias icat="chafa"
        alias tmux="TERM=xterm-256color tmux"
        ;;
    xterm-256color)
        alias icat="chafa"
        ;;
esac

if [ -x /usr/bin/lsd ]; then
    alias lsd="/usr/bin/lsd --icon never"
    alias ls="lsd"
    alias ll="lsd -alF"
    alias la="lsd -A"
    alias l="lsd -F"
else
    alias ll="ls -alF"
    alias la="ls -A"
    alias l="ls -CF"
fi

alias edit=$EDITOR
alias ff="fastfetch"

alias py="python3"
alias kilall="killall"
